CREATE OR REPLACE FUNCTION proc_valida_Cortez()
  RETURNS SETOF integer AS
$BODY$

DECLARE
	nresult_ integer;
BEGIN
	select count(*) from mesa where nestado <> 16 into nresult_;
	RETURN next nresult_;
END;

$BODY$
  LANGUAGE 'plpgsql' VOLATILE;




